package com.mocksamples.greeting
{
	public class Greeting
	{
		private var translator:Translator;
		private const HELLO:String = "Hello";
		public function Greeting(translator:Translator){
			this.translator = translator;
		}  
		
		public function sayHello(language:String, name:String):String{
			var message:String;
			message = HELLO;
			// no need to call translator if the language is English 
			if (language!="English"){
				message = translator.translate("English", language, HELLO );
			}
			return message + " " + name;	
		}
		
	}
}